<form id="pagerForm" method="post" action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/index/')}">
	<input type="hidden" name="pageNum" value="{$currentPage|default='1'}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="_order" value="{$_REQUEST._order}"/>
	<input type="hidden" name="_sort" value="{$_REQUEST._sort}"/>
	<input type="hidden" name="search_where[name][like]" value="{$_REQUEST.search_where.name.like}"/>
	<input type="hidden" name="search_where[status][eq]" value="{$_REQUEST.search_where.status.eq}"/>
</form>
<div class="page">
	<div class="pageHeader">
		<form onsubmit="return navTabSearch(this);" action="__URL__" method="post">
			<div class="searchBar">
		        <table class="searchContent" style="margin:0 15;">
		            <tr>
		                <td>物料名称：</td>
		                <td>
		                   <input type="text" name="search_where[name][like]" size="16" value="{$search_where.name.like}" class="medium" >
		                </td>
		                <td align="right">状态：</td>
		                <td>
							<select class="combox" name="search_where[status][eq]">
								<option value="">请选择</option>
								<option value="1" <eq name="_REQUEST.search_where.status.eq" value="1">selected=selected</eq>>正常</option>
								<option value="0" <eq name="_REQUEST.search_where.status.eq" value="0">selected=selected</eq>>禁止</option>
							</select>
		                </td>
		                <td align="right">
		                	<div class="buttonActive">
		                		<div class="buttonContent">
		                			<button type="submit">检索</button>
		                		</div>
		                	</div>
		                </td>
		            </tr>
		        </table>
			</div>
		</form>
	</div>
	<!--列表开始-->
	<div class="pageContent" style="border-left:1px #B8D0D6 solid;border-right:1px #B8D0D6 solid">
		<div class="panelBar">
			<ul class="toolBar">
				<in name="goods_addId" value="$Think.session.rules">
					<li><a class="add" href="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/add','','')}" target="dialog" mask="true"><span>添加物料</span></a></li>
				</in>
				<in name="goods_delId" value="$Think.session.rules">
					<li><a class="delete" href="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/delete','','')}/id/{sid_goods}/navTabId/goodsList" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
				</in>
				<in name="goods_editId" value="$Think.session.rules">
					<li><a class="edit" href="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/edit','','')}/id/{sid_goods}" target="dialog" mask="true"><span>修改</span></a></li>
					<li class="line">line</li>
				</in>
			</ul>
		</div>
		<table class="table" width="99%" layoutH="112">
			<thead>
				<tr>
					<th>序号</th>
					<th orderField="name" <if condition="$Think.REQUEST._order eq 'name'">class="{$Think.REQUEST._sort}"</if>>名称</th>
					<th orderField="xinghao" <if condition="$Think.REQUEST._order eq 'xinghao'">class="{$Think.REQUEST._sort}"</if>>型号</th>
					<th orderField="guige" <if condition="$Think.REQUEST._order eq 'guige'">class="{$Think.REQUEST._sort}"</if>>规格</th>
					<th>生产厂家</th>
					<th>单位</th>
					<th>描述</th>
					<th orderField="createtime"
	            <if condition="$_REQUEST._order eq 'createtime'">class="{$_REQUEST._sort}"</if>>创建时间</th>
	            	<th orderField="edittime"
	            <if condition="$_REQUEST._order eq 'edittime'">class="{$_REQUEST._sort}"</if>>修改时间</th>
	            	<th>修改人</th>
					<th>状态</th>
					<th width="">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="v" key="k">
					<tr target="sid_goods" rel="{$v['id']}">
						<td>{$k+1}</td>
						<td>{$v['name']}</td>
						<td>{$v['xinghao']}</td>
						<td>{$v['guige']}</td>
						<td>{$v['factory']}</td>
						<td>{$v['unit']}</td>
						<td>{$v['remark']}</td>						
						<td>{:toDate($v['createtime'])}</td>
						<td>{:toDate($v['edittime'])}</td>
						<td>{$v['realname']}</td>		
						<td>{$v['status']|getStatus=###}</a></td>
						<td>
							<in name="goods_statusId" value="$Think.session.rules">
								{$v['status']|changeStatus=$v['id'],'navTabAjaxDone',MODULE_NAME,CONTROLLER_NAME,'goodsList'}
							</in>
						</td>
					</tr>
				</foreach>
			</tbody>
		</table>
		<div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select class="combox" name="numPerPage" onchange="navTabPageBreak({$Think.config.TMPL_L_DELIM}numPerPage:this.value{$Think.config.TMPL_R_DELIM})">
					<option value="10" <if condition="$numPerPage eq 10">selected</if>>10</option>
					<option value="20" <if condition="$numPerPage eq 20">selected</if>>20</option>
					<option value="50" <if condition="$numPerPage eq 50">selected</if>>50</option>
					<option value="100" <if condition="$numPerPage eq 100">selected</if>>100</option>
				</select>
				<span>条，共{$totalCount}条</span>
			</div>

			<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="{$pageNumShown}" currentPage="{$currentPage}"></div>
		</div>
	</div>
</div>